Previous Book Contents Book Index Next

Inside Macintosh: Open Transport /
Chapter 8 - TCP/IP Services / TCP/IP Services Reference
Constants and Data Types


Internet Address Structure

You use the internet address structure when providing a TCP or UDP address to the Open Transport functions OTConnect, OTSndURequest, and OTBind.
You can use the OTInitInetAddress function (page 8-52) to fill in an internet address structure. The internet address structure is defined by the InetAddress data type.

struct InetAddress {
      OTAddressType  fAddressType;/* address type; always AF_INET */
      InetPort       fPort;      /* port number */
      InetHost       fHost;      /* host address (network byte order) */
      UInt8          fUnused[8]; /* reserved */
};
Field Description
fAddressType
The address type. The only possible value for this field is AF_INET, which identifies the TCP/IP protocol family.
fPort
The port number.
fHost
The IP address of the host in network byte order (that is, high-order byte first) in hexadecimal notation.
fUnused
Reserved.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
15 AUG 1996